package com.example.lockandqueue;

import java.util.concurrent.*;

public class Main {


    public static void main(String[] args) {
        ExecutorService executorService = Executors.newCachedThreadPool();
        ExecutorService executorService1 = Executors.newFixedThreadPool(2);
        ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(11);
        ExecutorService executorService2 = Executors.newSingleThreadExecutor();
        ExecutorService executorService3 = Executors.newWorkStealingPool();

        ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();
        concurrentHashMap.put("1","1");
        concurrentHashMap.put("2","1");
        concurrentHashMap.put("3","1");
        concurrentHashMap.put("4","1");
        concurrentHashMap.put("5","1");
        concurrentHashMap.put("6","1");
        int size = concurrentHashMap.keySet().size();
        System.out.println(size);

        CountDownLatch countDownLatch = new CountDownLatch(10);
        countDownLatch.countDown();
        try {
            countDownLatch.await();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }


    }

}
